#!/bin/sh

LIBIT = $(HOME)/libit/bin/
EXE   = emitter receiver emitter_QAM2 receiver_QAM2 emitter_QAM4 receiver_QAM4
SOURCES = lecture.c
FLAGS = -g -Wall -O2 `$(LIBIT)libit-config --cflags`
LIBS  = `$(LIBIT)libit-config --libs`
CC    = gcc

all: $(EXE)

$(EXE): %: %.c $(SOURCES)
	$(CC) $(FLAGS) -o $@ $< $(LIBS) $(SOURCES) 

clean:
	-$(RM) $(EXE)
	-$(RM) *.wav
	-$(RM) *.plot

exe:
	./$(EXE)

